package com.thd.springboot.project.camundamanager.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.Date;
import java.util.List;
import java.util.Map;
@ApiModel(value="流程实例实体",description="流程实例实体")
public class ProcessInstanceEntity extends ProcDefEntity {

    @ApiModelProperty(value = "流程实例ID")
    private String processInstanceId;

    @ApiModelProperty(value = "业务主键")
    private String businessKey;

    @ApiModelProperty(value = "流程实例开启时间",notes = "格式:yyyy-MM-dd hh:mm:ss")
    @JsonFormat( pattern="yyyy-MM-dd hh:mm:ss",timezone = "GMT+8")
    private Date processInstanceStartTime;

    @ApiModelProperty(value = "流程实例结束时间",notes = "格式:yyyy-MM-dd hh:mm:ss")
    @JsonFormat( pattern="yyyy-MM-dd  hh:mm:ss",timezone = "GMT+8")
    private Date processInstanceEndTime;

    @ApiModelProperty(value = "流程变量")
    private Map<String,Object> processInstanceVar;

    @ApiModelProperty(value = "流程状态")
    private String state;

    private List<ProcessInstanceTaskEntity> hisTaskList;
    private List<ProcessInstanceTaskEntity> currentTaskList;


    public static ProcessInstanceEntity createInstance(){
        return new ProcessInstanceEntity();
    }

    public String getProcessInstanceId() {
        return processInstanceId;
    }

    public ProcessInstanceEntity setProcessInstanceId(String processInstanceId) {
        this.processInstanceId = processInstanceId;
        return this;
    }

    public String getBusinessKey() {
        return businessKey;
    }

    public ProcessInstanceEntity setBusinessKey(String businessKey) {
        this.businessKey = businessKey;
        return this;
    }

    public Date getProcessInstanceStartTime() {
        return processInstanceStartTime;
    }

    public ProcessInstanceEntity setProcessInstanceStartTime(Date processInstanceStartTime) {
        this.processInstanceStartTime = processInstanceStartTime;
        return this;
    }



    public Date getProcessInstanceEndTime() {
        return processInstanceEndTime;
    }

    public ProcessInstanceEntity setProcessInstanceEndTime(Date processInstanceEndTime) {
        this.processInstanceEndTime = processInstanceEndTime;
        return this;
    }


    public Map<String, Object> getProcessInstanceVar() {
        return processInstanceVar;
    }

    public ProcessInstanceEntity setProcessInstanceVar(Map<String, Object> processInstanceVar) {
        this.processInstanceVar = processInstanceVar;
        return this;
    }


    public List<ProcessInstanceTaskEntity> getHisTaskList() {
        return hisTaskList;
    }

    public ProcessInstanceEntity setHisTaskList(List<ProcessInstanceTaskEntity> hisTaskList) {
        this.hisTaskList = hisTaskList;
        return this;
    }

    public List<ProcessInstanceTaskEntity> getCurrentTaskList() {
        return currentTaskList;
    }

    public ProcessInstanceEntity setCurrentTaskList(List<ProcessInstanceTaskEntity> currentTaskList) {
        this.currentTaskList = currentTaskList;
        return this;
    }

    public String getState() {
        return state;
    }

    public ProcessInstanceEntity setState(String state) {
        this.state = state;
        return this;
    }
}
